
public class SymbolTableHeader {

	private Manager manager = null;
	private int width = 0;
	private SymbolTable backward = null;
	
	public SymbolTableHeader() {
		super();
	}
	
	public SymbolTableHeader(Manager manager, SymbolTable backward) {
		this();
		this.manager = manager;
		this.setBackward(backward);
	}
	
	public int getOffset() {
		return this.manager.getOffset();
	}
	
	public int getWidth() {
		return this.width;
	}
	
	public SymbolTable getBackward() {
		return this.backward;
	}
	
	public void setWidth(int width) {
		if(width > 0)
			this.width = width;
	}
	
	public void setBackward(SymbolTable backward) {
		this.backward = backward;
	}
	
	public void incrementTopEntryByValue(int value) {
		this.manager.incrementTopEntryByValue(value);
	}

	public String getSymbolTableHeaderHTMLFormat() {
		return "<tr><td>Previous Table:  " + (this.backward != null ? this.backward : "") + "</td><td>Offset:  " + this.width + "</td></tr>";
	}
}
